﻿<Window x:Class="MPExtended.Applications.ServiceConfigurator.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:tb="http://www.hardcodet.net/taskbar"
       Title="MPExtended Configurator" Height="450" Width="760" MinWidth="760" Closing="Window_Closing" Icon="/MPExtended.Applications.ServiceConfigurator;component/Images/MpExtl_Icon.png" MinHeight="450">
    <Grid>
        <tb:TaskbarIcon 
      IconSource="/Icons/TrayIcon.ico"
      ToolTipText="MPExtended Configuration" TrayLeftMouseUp="TaskbarIcon_TrayLeftMouseUp">
            <tb:TaskbarIcon.TrayToolTip>
                <Border
      Background="White"
      BorderBrush="Orange"
      BorderThickness="2"
      CornerRadius="4"
      Opacity="0.8"
      Width="160"
      Height="40">
                    <TextBlock
        Text="MPExtended Configuration"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        />
                </Border>
            </tb:TaskbarIcon.TrayToolTip>

            <!-- Set a simple context menu  -->
            <tb:TaskbarIcon.ContextMenu>
                <ContextMenu Opened="ContextMenu_Opened">
                    <MenuItem Name="MenuOpenConfigurator" Header="Open MPExtended Configurator" Click="MenuOpenConfigurator_Click" />
                    <MenuItem Name="MenuStartCloseMp" Header="Start MediaPortal" Click="MenuStartCloseMp_Click"/>
                    <MenuItem Name="MenuPowermodes" Header="Powermodes">
                        <MenuItem Name="MenuPowermodeLogoff" Header="LogOff" Click="MenuPowermodeLogoff_Click"/>
                        <MenuItem Name="MenuPowermodeSuspend" Header="Suspend" Click="MenuPowermodeSuspend_Click"/>
                        <MenuItem Name="MenuPowermodeHibernate" Header="Hibernate" Click="MenuPowermodeHibernate_Click"/>
                        <MenuItem Name="MenuPowermodeReboot" Header="Reboot" Click="MenuPowermodeReboot_Click"/>
                        <MenuItem Name="MenuPowermodeShutdown" Header="Shutdown" Click="MenuPowermodeShutdown_Click"/>
                    </MenuItem>
                    <MenuItem Name="MenuExit" Header="Exit"  Click="MenuExit_Click"/>
                </ContextMenu>
            </tb:TaskbarIcon.ContextMenu>

        </tb:TaskbarIcon>
        <Frame x:Name="MainFrame"></Frame>
    </Grid>
</Window>